﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xunit;
using System.Dynamic;

namespace Windy.Json
{
    public class DynamicObjectTest
    {
        [Fact()]
        public void Foo()
        {
            dynamic a = new ExpandoObject();
            var dict = a as IDictionary<string, object>;
            a.str = "111";
            a.number = 123;
            dict.Add("Test", "ok");
            
            Assert.Equal("111", a.str);
            Assert.Equal(123, a.number);
            Assert.Equal("ok", a.Test);
            
        }


    }
}
